import request from '@/utils/request'
import qs from 'qs'

//开卡激活
export function cardOrdersList(params){
    return request({
        url:'/api/cardOrders',
        method:'get',
        params: qs.stringify(params)
    })
}


//充值交费
export function rechargeRecordsList(params){
    return request({
        url:'/api/rechargeRecords',
        method:'get',
        params: qs.stringify(params)
    })
}

//SIM卡列表
export function simCardsList(params){
    return request({
        url:'/api/simCards',
        method:'get',
        params: qs.stringify(params)
    })
}

//划拨平台服务商
export function bindServiceProvider(params){
    return request({
        headers:{'Content-Type':'application/x-www-form-urlencoded'},
        url:'/api/zjcards/bindServiceProvider',
        method:'post',
        data:qs.stringify(params)
    })
}

//财务对帐
export function accountCountsList(params){
    return request({
        url:'/api/accountCounts',
        method:'get',
        params: qs.stringify(params)
    })
}

//财务对帐导出
export function accountCountsExport(params){
    return request({
        url:'/api/accountCounts/export',
        method:'get',
        params:qs.stringify(params)
    })
}


//充值导出
export function rechargeRecordsExport(params){
    return request({
        url:'/api/rechargeRecords/export',
        method:'get',
        params:qs.stringify(params)
    })
}

//SIM导入模板
export function simCardimportTemplate(params){
    return request({
        url:'/api/simCard/importTemplate',
        method:'get',
    })
}

//商品列表
export function itemList(params){
    return request({
        url:'/api/itemConfigs',
        method:'get',
        params: qs.stringify(params)
    })
}

//商品列表新增
export function itemadd(params){
    return request({
        headers:{'Content-Type':'application/x-www-form-urlencoded'},
        url:'/api/itemConfigs',
        method:'post',
        data:qs.stringify(params)
    })
}

//商品列表修改
export function itemUpdate(params){
    return request({
        headers:{'Content-Type':'application/x-www-form-urlencoded'},
        url:'/api/itemConfigs/'+ params.id,
        method:'put',
        data:qs.stringify(params)
    })
}